<?php

    /**
     * Tecdoc
     *
     * @package      Core
     * @subpackage   Soap
     *
     * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
     */
	abstract class Core_Soap_Abstract
	{

    ////////////////////////////////////////////////////////////////////////////
	//                                Variables                               //
	////////////////////////////////////////////////////////////////////////////

        /**
         * The SOAP adapter
         *
         * @var Core_Soap_Adapter_Abstract
         */
        protected $_adapter = null;

        /**
		 * URL of the SOAP Sever
		 *
		 * @var string
		 */
		protected $_url = null;

	////////////////////////////////////////////////////////////////////////////
	//                                 Methods                                //
	////////////////////////////////////////////////////////////////////////////

	    /**
		 * Constructor
	     */
	    public function __construct($adapter = 'Soapclient')
		{
            $this->_adapter = Core_Soap::factory($adapter);
	    }

        /**
         * Destructor
         */
        public function __destruct()
        {
            unset($this);
        }

        /**
         * Sets WSDL
         *
         * @param       string      $url
         * @return      void
         */
        public function setWsdl($url)
        {
            $this->_url = $url;
        }

        /**
         * Calls the SOAP server with the requested parameters
         *
         * @param       string      $method
         * @param       array       $params
         * @throws      Core_Exception
         * @return      array
         */
        public abstract function call($method, array $params = array());
	}
